<ui:component xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ice="http://www.icesoft.com/icefaces/component"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    
        
        
            <p:dataTable var="customer" value="#{adminCustomersControllerBean.customers}" id="customerTable"
                         rowEditListener="#{adminCustomersControllerBean.updateRow}">

                <f:facet name="header">
                    Customers:
                </f:facet>

                <p:column headerText="Name" style="width:150px">
                    <p:cellEditor>
                        <f:facet name="output">
                            <h:outputText value="#{customer.name}" />
                        </f:facet>
                        <f:facet name="input">
                            <p:inputText value="#{customer.name}"
                                         valueChangeListener="#{adminCustomersControllerBean.nameChanged}"
                                         style="width:100%">
                                <f:attribute name="customer" value="#{customer}"/>
                            </p:inputText>
                        </f:facet>
                    </p:cellEditor>
                </p:column>
                <p:column headerText="Address" style="width:150px">
                    <p:cellEditor>
                        <f:facet name="output">
                            <h:outputText value="#{customer.address}" />
                        </f:facet>
                        <f:facet name="input">
                            <p:inputText value="#{customer.address}" style="width:100%" 
                                         valueChangeListener="#{adminCustomersControllerBean.addressChanged}">
                                <f:attribute name="customer" value="#{customer}"/>
                            </p:inputText>
                        </f:facet>
                    </p:cellEditor>
                </p:column>
                <p:column headerText="Email" style="width:150px">
                    <p:cellEditor>
                        <f:facet name="output">
                            <h:outputText value="#{customer.email}" />
                        </f:facet>
                        <f:facet name="input">
                            <p:inputText value="#{customer.email}" style="width:100%" 
                                         valueChangeListener="#{adminCustomersControllerBean.emailChanged}">
                                <f:attribute name="customer" value="#{customer}"/>
                            </p:inputText>
                        </f:facet>
                    </p:cellEditor>
                </p:column>
                <p:column headerText="Password" style="width:150px">
                    <p:cellEditor>
                        <f:facet name="output">
                            <h:outputText value="#{customer.password}" />
                        </f:facet>
                        <f:facet name="input">
                            <p:inputText value="#{customer.password}" style="width:100%" 
                                         valueChangeListener="#{adminCustomersControllerBean.passwordChanged}" >
                                <f:attribute name="customer" value="#{customer}"/>
                            </p:inputText>
                        </f:facet>
                    </p:cellEditor>
                </p:column>

                <p:column headerText="Options">
                    <p:rowEditor>

                    </p:rowEditor> 
                </p:column>
                <f:attribute name="customer" value="#{customer}"/>    
            </p:dataTable>

        

        


    
</ui:component>
